<p class="breadcrumbs"><strong>You are here:</strong> &raquo; <a href="<?php echo $gene_uri ?>"><?php _e($gene_name) ?></a> &raquo; <a href="<?php echo Gene::makeLink(Gene::specialId('Settings')) ?>">Settings</a> &raquo; Public Name</p>

<h2>Public Name</h2>

<?php if ($success): ?>
	<p><strong>Your public name has been changed successfully.</strong></p>
<?php endif; ?>

<?php if ($errormsg): ?>
	<p class="errormessage"><?php _e($errormsg) ?></p>
<?php endif; ?>

<p>Your public name is a name which others will know you by. This could be your real name or a nickname.</p>

<p class="fieldlabel">Current Public Name:</p>
<p class="field"><?php _e($member['name']) ?></p>

<form method="post" action="<?php echo Gene::makeLink(Gene::specialId('Settings')) ?>/name">

<p class="fieldlabel">Select Public Name:</p>
<p class="field">
<?php foreach ($publicnames as $i): ?>
	<label><input type="radio" name="publicname" value="<?php _e($i['name']) ?>"<?php if ($i['name'] == $member['name']): ?> checked="checked"<?php endif; ?> /><?php _e($i['name']) ?> <em>(Last used <?php echo timeAgo($i['timestamp']) ?> ago)</em></label><br />
<?php endforeach; ?>

<?php if ($numnames['allowed'] > 0): ?>
	<label><input type="radio" id="newname" name="publicname" value="!newname!" /><em>Or enter a new name...</em></label>
	<input type="text" name="newname" id="regname" onchange="$('newname').checked = true;" /> <span id="checkname"></span>
<?php endif; ?>
</p>

<p class="formcontrols"><input type="submit" value="Change Public Name" class="btn_focus" /></p>
</form>
